<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学生列表</title>
    <!--1. 引入jquery-->
    <script src="/webjars/jquery/3.6.4/jquery.min.js"></script>
    <!--2. 引入bootstrap的css库-->
    <link rel="stylesheet" href="/webjars/bootstrap/3.4.1/css/bootstrap.min.css">
    <!--3. 引入bootstrap的js库-->
    <script src="/webjars/bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <style>
        .table{
            text-align: center;
        }
        .panel-title{
            padding:5px 0px;
        }
    </style>
</head>
<body>

    <div class="container">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">
                    学生信息列表
                </h3>
            </div>
            <table class="table table-hover table-striped">
                <tr>
                    <td>学号</td>
                    <td>姓名</td>
                    <td>性别</td>
                    <td>年龄</td>
                    <td>住址</td>
                    <td>所在班级</td>
                    <td>操作</td>
                </tr>
                <tr th:each="stud : ${students}">
                    <td>[[${stud.sid}]]</td>
                    <td th:text="${stud.sname}"></td>
                    <td th:text="${stud.sex}"></td>
                    <td th:text="${stud.age}"></td>
                    <td th:text="${stud.addr}"></td>
                    <td th:text="${stud.cname}"></td>
                    <td>
                        <a href="#" class="btn btn-success btn-sm">修改</a>
                        <a href="#" class="btn btn-danger btn-sm">删除</a>
                    </td>
                </tr>
            </table>
            <div class="panel-footer text-right">
                SpringBoot + MybatisPlus + Thymeleaf整合开发.
            </div>
        </div>
    </div>
</body>
</html>